<%--
  Created by IntelliJ IDEA.
  User: Sssller
  Date: 2021/1/25
  Time: 16:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Title</title>
    <!-- Bootstrap -->
    <link href="${pageContext.request.contextPath}/static/boostrap/css/bootstrap.css" rel="stylesheet">

    <style>
        body{
            font-size: 18px;
        }
    </style>
</head>

<body>
<div class="container-fluid">
    <ol class="breadcrumb">
        <li><a href="#">首页</a></li>
        <li class="active">TbPanel</li>
    </ol>
    <div class="panel  panel-info">
        <div class="panel-heading">
            条件查询
        </div>

        <div class="panel-body">
            <form   class="form-inline" action="${pageContext.request.contextPath}/TbPanel/search" method="post" >

                <div  class="form-group">
                    <lable>类型:</lable>
                    <input name="type" type="text" class="form-control">
                </div>
                <div  class="form-group">
                    <lable>排列序号:</lable>
                    <input name="sortOrder" type="text" class="form-control">
                </div>

                <input type="submit" value="搜索" class="btn btn-primary" />

                <a class="btn btn-success" href="${pageContext.request.contextPath}/TbPanel/insert">添加数据</a>
            </form>
        </div>
    </div>

    <table class="table  table-bordered  table-hover">
        <tr>
            <td>编号</td>
            <td>板块名称</td>
            <td>类型</td>
            <td>排列序号</td>
            <td>所属位置</td>
            <td>板块限制商品数量</td>
            <td>状态</td>
            <td>备注</td>
            <td>创建时间</td>
            <td>更新时间</td>
            <td>操作</td>
        </tr>
    <c:forEach items="${id}" var="p">
        <tr>
            <td>${p.id}</td>
            <td>${p.name}</td>
            <td>${p.type}</td>
            <td>${p.sortOrder}</td>
            <td>
                <c:if test="${p.position==0}">首页</c:if>
                <c:if test="${p.position==1}">商品推荐</c:if>
                <c:if test="${p.position==2}">我要捐赠</c:if>
            </td>
            <td>${p.limitNum}</td>
            <td>${p.status}</td>
            <td>${p.remark}</td>
            <td>
                <fmt:formatDate value="${p.created}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
            </td>
            <td>
                <fmt:formatDate value="${p.updated}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
            </td>
            <td>
                <a href="${pageContext.request.contextPath}/TbPanel/update?id=${p.id}">
                编辑
            </a>
            </td>
        </tr>
    </c:forEach>
    </table>
</div>
</body>
<script src="${pageContext.request.contextPath}/static/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/static/boostrap/js/bootstrap.js"></script>
</html>
